<template>
  <div class="app">
    <h1>当前计数为: {{ counter }}</h1>
    <h1>双倍快乐: {{ doubleCounter }}</h1>
    <button @click="increment">+</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      counter: 100,
    };
  },
  methods: {
    increment() {
      this.counter++;
    },
  },
  computed: {
    doubleCounter() {
      return this.counter * 2;
    },
  },
};
</script>
<style lang="scss" scoped></style>
